home *** CD-ROM | disk | FTP | other *** search
- Path: newshost.lanl.gov!tanmoy
- From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
- Newsgroups: comp.lang.c
- Subject: Re: argc/argv & switches
- Date: 08 Mar 1996 16:59:31 GMT
- Organization: Los Alamos National Laboratory
- Message-ID: <TANMOY.96Mar8095931@qcd.lanl.gov>
- References: <4h2j8j$9gn@milo.freenet.vancouver.bc.ca> <danpop.825593142@rscernix>
- <313E0094.167EB0E7@fore.com> <4hl52oINNa4l@anvil.ugrad.cs.ubc.ca>
- <danpop.826238070@rscernix> <4ho9dv$bcb@castle.nando.net>
- NNTP-Posting-Host: qcd.lanl.gov
- Mime-Version: 1.0
- Content-Type: text
- In-reply-to: actuary@nando.net's message of 8 Mar 1996 03:26:55 GMT
-
- In article <4ho9dv$bcb@castle.nando.net>
- actuary@nando.net (Bill McCarthy) writes:
- <snip>
- BM: According to Herbert Schildt, 5.1.2.2.1 states "The parameters argc and
- BM: argv and the strings pointed to by the argv array shall be modifiable
- BM: by the program, and retain their last-stored values between program
- BM: startup and program termination."
- BM:
- BM: I'm just reading the standard for the first time, and am only up to page
- BM: 26 :-( so be kind - what am I missing?
-
- Yes, argc and argv must be modifiable, as well as the strings pointed
- to by argv. The discussion was however about the pointers to the
- strings, and no statement about those exists here.
-
- BM:
- BM: While we're on the standard, Dan, is the "missing period" contained on
- BM: page 26 (6.1.3.1)?
- BM:
- BM: I've been stuck on this page because (1) the standard seems to define
- BM: numbers such as "123" (i.e. a string of 1 or more digits) to be a double
- BM: here and as an int in the following section (I peaked :-). There appears
- BM: to be a need for a period at the end of the second line following
- BM: "fractional-constant."
-
- 123 is an integer constant, not a double.
-
- BM:
- BM: And (2), negative numbers cannot be doubles? From experience,
- BM: this appears wrong. But the only sign I see in the syntax is in the
- BM: exponent-part.
- BM:
-
- negative numbers don't exist as tokens. The - is an unary operator
- which `negates' the next number: whether that results in a negative
- number depends on the semantics of -. Thus for example -3U is a
- positive number.
-
- Cheers
- Tanmoy
- --
- tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
- Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
- Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
- <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
- internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
- fax: 1 (505) 665 3003 voice: 1 (505) 665 4733 [ Home: 1 (505) 662 5596 ]
-